﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CarriageType_Edit.aspx.cs" Inherits="Shop_CarriageType_Edit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>编辑配送方式</title>
    <link href="../Style/main.css" rel="stylesheet" type="text/css" />
    
    <script type="text/javascript">
        function Check()
        {
            var PayTypeName = document.getElementById("tbCarriageTypeName").value;                        
            var sort = document.getElementById("tbMoney").value;
            
            if(PayTypeName == "")
            {
                alert("配送方式名称不能为空！");
                return false;
            }

            if(sort == "")
            {
                alert("收费标准不能为空！");
                return false;
            }
            else
            {
                if(parseInt(sort)<0)
                {
                    alert("收费标准只能是大于0的正整数！");
                    return false;
                }
            }                                     
        }
    </script>
    
</head>
<body>
    <form id="form1" runat="server">
    <center>
        <table style="width: 380px; height:160px; background-color: #85BDE2; vertical-align: middle; "
        border="0px" cellpadding="0px" cellspacing="1px">
        <tr>
            <td colspan="2" style="background-color: #DAE7F8; height: 30px;">
                <strong>配送方式</strong>
            </td>
        </tr>
        <tr style="background-color: #DAE7F8;">
            <td align="right" style="width: 35%;">
                配送方式名称：
            </td>
            <td align="left" style="width: 65%;">
                <asp:TextBox ID="tbCarriageTypeName" runat="server" Height="15px" Width="150px"></asp:TextBox>
            </td>
        </tr>
        <tr style="background-color: #DAE7F8;">
            <td align="right" style="width: 35%;">
                是否启用：
            </td>
            <td align="left" style="width: 65%;">
            <asp:DropDownList ID="dlUse" runat="server" Height="25px" Width="150px" >
            <asp:ListItem Value="1">是</asp:ListItem>
            <asp:ListItem Value="0">否</asp:ListItem>
            </asp:DropDownList>
               
            </td>
        </tr>
        
         <tr style="background-color: #DAE7F8;">
            <td align="right" style="width: 35%;">
                收费标准：
            </td>
            <td align="left" style="width: 65%;">
                <asp:TextBox ID="tbMoney" runat="server" Height="15px" Width="150px"></asp:TextBox>
            </td>
        </tr>
        <tr style="background-color: #DAE7F8;">
            <td align="center" colspan="2">
                <asp:Button ID="btnOK" runat="server" Text="确定" Width="80" OnClientClick="return Check()"
                    onclick="btnOK_Click" />             
            </td>
        </tr>
    </table>
    </center>
    <input id="hType" type="hidden" runat="server"/>
    <input id="hID" type="hidden" runat="server"/>
    </form>
</body>

</html>
